﻿using ProjectFootball.MVC.Foundation;
using ProjectFootball.MVC.Foundation.ResourceLibrary;
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Security.Principal;

namespace ProjectFootball.MVC.Models.EntityFramework.Entities
{
    public class Venue : BaseApprovableEntity, IApprovableEntity
    {
        #region Constructors
        public Venue()
        {
        }

        public Venue(IPrincipal user, CreateType createType, Guid approvalGuid, string venueName, string address, Guid countryGuid, int? capacity)
            :base(user, createType, approvalGuid)
        {
            VenueName = venueName;
            Address = address;
            CountryGuid = countryGuid;
            Capacity = capacity;
        }
        #endregion

        [StringLength(50)]
        [Required]
        public string VenueName { get; set; }

        [StringLength(100)]
        public string Address { get; set; }

        public Guid CountryGuid { get; set; }
        public int? Capacity { get; set; }

        [ForeignKey("CountryGuid")]
        public virtual Country Country { get; set; }
    }
}